package com.atguigu.tingshu.user.service;

import com.atguigu.tingshu.common.result.Result;
import com.atguigu.tingshu.model.user.UserInfo;
import com.atguigu.tingshu.model.user.VipServiceConfig;
import com.atguigu.tingshu.vo.user.UserInfoVo;
import com.atguigu.tingshu.vo.user.UserPaidRecordVo;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 用户信息服务
 *
 * @author ym
 * @date 2025/06/28 16:24
 */
public interface UserInfoService extends IService<UserInfo> {

    /**
     * wx登录
     *
     * @param code 代码
     * @return {@link String}
     */
    String wxLogin(String code);

    /**
     * 获取用户信息
     *
     * @param userId 用户ID
     * @return {@link UserInfo}
     */
    UserInfo getUserInfo(Long userId);

    /**
     * 更新用户
     *
     * @param userInfoVo 用户信息
     * @param userId     用户ID
     */
    void updateUser(UserInfoVo userInfoVo, Long userId);

    /**
     * 用户付费轨道
     *
     * @param userId            用户ID
     * @param albumId           专辑ID
     * @param needcheckTrackIds 需要检查跟踪ID
     * @return {@link Map<Long, Integer>}
     */
    Map<Long, Integer> userIsPaidTrack(Long userId, Long albumId, List<Long> needcheckTrackIds);

    /**
     * 找到所有
     *
     * @return {@link Result<List<VipServiceConfig>>}
     */
    Result<List<VipServiceConfig>> findAll();

    Boolean getalbumisPaidorNot(Long userId, Long albumId);

    Boolean getUserIsVipOrNot(Long userId, Long albumId);

    List<Long> getuserIsPaidTrackIdList(Long userId, Long albumId, List<Long> needcheckIdList);

    void addUserPaidRecord(Long userId, UserPaidRecordVo userPaidRecordVo);
}
